#include <stdio.h>
#include "applib/lib_syscall.h"


char cmd_buf[256];

int main(int argc,char **argv){
    
    //setvbuf(stdout, NULL, _IONBF, 0);
    open(argv[0],0);
    dup(0);
    dup(0);
    for(int i=0;i<argc;i++){
        printf("%s ",argv[i]);
    }

    // 创建一个自己的副本
    //int pid=fork();

    //yield();

        for (;;) {
            printf("child pid=%d\n", getpid());
            //gets(cmd_buf);
            //puts(cmd_buf);
            msleep(1000);
        }
  

}